package org.example.lethear.dto.like;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 点赞DTO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LikeDTO {
    
    private Long id;
    private String targetType; // post, comment
    private Long targetId;
    private LocalDateTime createdAt;
    
    /**
     * 点赞用户信息
     */
    private UserInfo user;
    
    /**
     * 目标信息
     */
    private TargetInfo target;
    
    /**
     * 用户信息内部类
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class UserInfo {
        private Long id;
        private String username;
        private String nickname;
        private String avatar;
    }
    
    /**
     * 目标信息内部类
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class TargetInfo {
        private Long id;
        private String type;
        private String title; // 帖子标题或评论内容摘要
        private String content;
        private Long authorId;
        private String authorUsername;
    }
} 